var url = "http://10.158.41.45:8099/";
var list;
var listF;
var listZ;
// 初始化
function init(n){
	$.ajax({
		type:"get",
		url:url+"wrmanage/bigData/api/init/"+n,
		async:true,
		success: function (res){
			console.log(res);
//			list = res.content.incuId;
//			if(res.content.isDivi == 1){
//				for(var i = 0; i<list.length; i++){
//					isDivi(list[i])
//				}
//			}
		},
		error: function (err){
			
		}
	});
}

//总公司
function isTotal(){
	$.ajax({
		type:"get",
		url:url+"wrmanage/bigData/api/cydPlatData",
		async:true,
		success: function (res){
			console.log(res)
			listZ = res.content
		},
		error: function (err){
			alert("error")
		}
	});
}

//分公司
function isDivi(id){
	$.ajax({
		type:"get",
		url:url+"/wrmanage/bigData/api/cydIncuData?incuId="+id,
		async:true,
		success: function (res){
			console.log(res)
			listF = res.content
		},
		error: function (err){
			alert("error")
		}
	});
}